/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author Luis Alejandro Monge Monge
 */
public class fraseado 
{
    String[] alfabeto = {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","ñ","o","p","q","r","s","t","u","v","w","x","y","z"};
    String[] numeros = {"1","2","3","4","5","6","7","8","9","0"};
    private String cadena;
    private String laAleatoria;
    private String noAleatorio;
    
    
    public String posicion(String pos)
    {
       if(pos.equals("n") == true)
       {
         return nA();  
       }
       else if(pos.equals("l") == true)
       {
           return lA();
       }
       else if(pos.equals("L") == true)
       {
           return lA().toUpperCase();
       }
       else
       {
           return pos;
       }
    }

    public String tester(String p1,String p2,String p3,String p4,String p5,String p6)
    {
        return this.cadena = posicion(p1)+posicion(p2)+posicion(p3)+posicion(p4)+posicion(p5)+posicion(p6);
       
    }
    public String nA()
    {
        this.noAleatorio = numeros[(int)(Math.random()*10)];
        return  this.noAleatorio;
    }
    
    public String lA()
    {
       this.laAleatoria = alfabeto[(int)(Math.random()*27)];
       return this.laAleatoria;
    }
}
